import React,{useState} from "react";
import { Search, Toast, Tag,ShareSheet } from "react-vant";

import { useNavigate } from "react-router-dom";
const index: React.FC = () => {
  const navigate = useNavigate();
  const [options ,setOptions] = useState([
  [
    { name: '微信', icon: 'wechat' },
    { name: '朋友圈', icon: 'wechat-moments' },
    { name: '微博', icon: 'weibo' },
    { name: 'QQ', icon: 'qq' },
  ],
  [
    { name: '复制链接', icon: 'link' },
    { name: '分享海报', icon: 'poster' },
    { name: '二维码', icon: 'qrcode' },
    { name: '小程序码', icon: 'weapp-qrcode' },
  ],
])
 const [visible, setVisible] = useState(false)
  return (
    <div>
      
      <div
        className="top-div"
        style={{
          display: "flex",
          justifyContent: "center",
          alignItems: "center",
        }}
      >
        {/* <GoodJobO style={{ fontSize: '40px', color: '#fff' }} /> */}
        <img
          style={{ width: "35px", height: "35px" }}
          src="../../src/img/hdf.gif"
          alt=""
          
        />
        <Search
          onClickInput={() => navigate("/homesearch")}
          showAction={false}
          shape="round"
          background={"#2359d3"}
          placeholder="请输入搜索关键词"
        />
        <Tag
          round
          style={{
            fontSize: "16px",
            with: "50px",
            color: "#fff",
            height: "30px",
          }}
          type="primary" onClick={() => setVisible(true)}
        >
          分享
        </Tag>
        &nbsp;&nbsp;
        <Tag
          round
          style={{
            fontSize: "16px",
            with: "50px",
            color: "#fff",
            height: "30px",
          }}
          type="primary"
          onClick={() => navigate("/mymessage")}
        >
          消息
        </Tag>
      </div>
      <div className="tophome">
        {/* 顶部 */}

        <div className="top-text" onClick={() => navigate("/weijianwei")}>
          <div>国家卫建委认证医疗机构</div>
          <div>专注医疗18年.专注权威 &gt;</div>
        </div>
        <img className="top-img" onClick={() => navigate("/yhj")} src="../../src/img/newuser.gif" alt="" />
        <div className="top-div2" onClick={() => navigate("/wodeshi")}>
          <div className="top-div2-a">
            <div>我的</div>
            <div>候诊室</div>
          </div>
          <div className="top-div2-b" >
            <div>
              代办事项
              <div>()</div>
            </div>
            <div>
              我的问诊
              <div>()</div>
            </div>
            <div>顾问服务</div>
            <div>
              商家服务
              <div>()</div>
            </div>
          </div>
          <div className="top-div2-c">
            {/* 大于号逻辑符 */}
            去查看&gt;
          </div>
        </div>
      </div><ShareSheet
        visible={visible}
        options={options}
        title='立即分享给好友'
        onCancel={() => setVisible(false)}
        onSelect={(option, index) => {
          console.log('option', option)
          console.log('index', index)
          setVisible(false)
        }}
      />
    </div>
  );
};

export default index;
